/*
 * @Author: wuzhouhai wzh200x@126.com
 * @Date: 2024-07-08 16:04:02
 * @LastEditors: wuzhouhai wzh200x@126.com
 * @LastEditTime: 2024-07-12 10:54:38
 * @FilePath: \dwys_web\assets\script\Main.ts
 * @Description: 
 */
import { _decorator, Component, Node } from 'cc';
import { Root } from '../../extensions/oops-plugin-framework/assets/core/Root';
import { UIConfigData, UIID } from './common/config/GameUIConfig';
import { oops } from '../../extensions/oops-plugin-framework/assets/core/Oops';
import { ecs } from '../../extensions/oops-plugin-framework/assets/libs/ecs/ECS';
import { GameEvent } from './common/event/GameEvent';
const { ccclass, property } = _decorator;

@ccclass('Main')
export class Main extends Root {
    rootSystem: ecs.RootSystem|null = null;
    start() {

    }

    onLoad(): void {
        super.onLoad();
        this.rootSystem = new ecs.RootSystem();
        this.rootSystem.init();
    }

    protected run() {
        oops.message.dispatchEvent(GameEvent.GameStartRun);
    }

    protected initGui() {
        oops.gui.init(UIConfigData);
    }

    update(deltaTime: number) {
    }
}


